package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Comment;
import com.tanhua.model.mongo.CommentType;
import org.bson.types.ObjectId;

import java.util.List;

public interface CommentApi {

    List<Comment> findComments(String movementId, CommentType comment, Integer page, Integer pagesize);

    Integer save(Comment comment);


    boolean findCommentByUserId(Long userId, String movementId, CommentType like);

    Integer remove(Comment comment);

    Comment getCommentByUserId(String commentId);

    Integer saveComment(Comment comment);


    Integer removeComment(Long userId, String commentId);

    List<Integer> getComment(ObjectId id, Long userId);

    List<Comment> comments(Long id,Integer page, Integer pagesize, Integer commentType);

    List<Comment> loves(Long userId, Integer page, Integer pagesize, Integer commentType);

    Boolean findByUserIdAndPublishUserId(Long userId, Long id);
}